﻿@inject IHttpService _httpService

@inject IDataCacheService _dataCacheService
@inject NavigationManager NavigationManager
@inject IMauiService _mauiService


<CnGalWebSite.Components.Buttons.MasaButton Fab Icon="mdi-share" Tooltip="分享" Class="@Class" OnClick="OnClickStar" />



@code {
    [Parameter]
    public string Class { get; set; }
    [Parameter]
    public string Title { get; set; }
    [Parameter]
    public string Text { get; set; }


    private async Task OnClickStar()
    {
        await _mauiService.ShareLink(new ShareLinkModel
        {
            Link = NavigationManager.Uri.Replace(NavigationManager.BaseUri,"https://www.cngal.org"),
            Text = Text,
            Title = Title,
        });
    }
}
